<style type="text/css" media="all">
@import "loginregister.css";
.body{
}
</style>
<div class="header">
<?php
     if($_POST["op"]=="register"){
	   include("do_register.inc.php");	
	   exit;
	   }
	   include("../head.php");
?>
</div>
<div class="import1">
<table id="content" border="0" cellpadding="0" cellspacing="6" class="border">
<tr><td id="main">
<div class="breadcrumb"><a href="./" class="STYLE1">HomePage</a></div>
<h2>useraccount</h2><ul class="tabs primary">
<li class="active"><a href="register.php" class="active">registe</a></li>
<li class="active"><a href="login.php">login</a></li></ul>
<script>
	function check_form() {
		username = document.getElementById("edit-myname").value;
		password = document.getElementById("edit-mypass").value;
		password2 = document.getElementById("edit-mypass2").value;
		mail = document.getElementById("edit-mail").value;
		
		emsg = "";
		if(username == "") emsg += "not fill in the user's name. \n";
		if(password == "") emsg += "not fill in the password. \n";
		if(password != password2) emsg += "the passwords you input twice are not consistent. \n";
		var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
		if(!pattern.test(mail)) emsg += "the format of the e-mail is wrong. \n";
		if(emsg != "" ) {
			emsg = "------------------------------------------\n\n"+emsg;
			emsg = emsg+"\n------------------------------------------";
			alert(emsg);
			return false;
		}else {
			return true;
		}
	}
</script>
 
<!-- begin content -->
<form action="register.php" method="post" id="user_register">
<div>
<div class="form-item">
<label for="edit-name">user: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="form-required" title="This field is required.">*</span></label>
<input type="text" maxlength="130" name="edit[name]" id="edit-myname" size="50" value="" class="form-text required" />
<span class="description">(your name or the name you like.allow Chinese or English,blank and number.)</span>
</div>

<div class="form-item">
<label for="edit-pass">password: <span class="form-required">*</span></label>
<input type="password" maxlength="130" name="edit[pass]" id="edit-mypass" size="55" value="" class="form-text required" />
<span class="description">(please input your password.) </span>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" maxlength="130" name="edit[pass2]" id="edit-mypass2" size="55" value="" class="form-text required" />
<span class="description">(please input your password again.)</span>
</div>
<div class="form-item">
<label for="edit-mail">E-mailAdd:<span class="form-required" title="This field is required.">*</span></label>
<input type="text" maxlength="130" name="edit[mail]" id="edit-mail" size="50" value="" class="form-text required" />
<span class="description">(your e-mail address, make sure it is right.)</span>
</div>
<div class="form-item">
<label for="edit-sex">sex: </label>
secret<input type="radio" name="edit[sex]" value="0" checked="checked" />
male<input type="radio" name="edit[sex]" value="1" />
female<input type="radio" name="edit[sex]" value="2" />
</div>
<div class="form-item">
<label for="edit-tel">phone call:&nbsp;&nbsp;</label>
<input type="text" maxlength="130" name="edit[tel]" id="edit-tel" size="50" value="" />
<span class="description">(your phone number, make sure that is right.)</span>
<div class="description"></div></div>
<div class="form-item">
<label for="edit-web">website: &nbsp;&nbsp;&nbsp;&nbsp;</label>
<input type="text" maxlength="130" name="edit[web]" id="edit-web" size="50" value=""/>
<span class="description">(your website, if you have.)</span>
</div>
<div class="form-item">
<label for="edit-birthday">birthday: &nbsp;&nbsp;&nbsp; </label>
<input type="text" maxlength="130" name="edit[birthday]" id="edit-birthday" size="50" value="" />
<span class="description">(please inpput your birthday.)</span>
</div>
<div class="form-item">
<label for="edit-inter">hobby:<br>
</label>
<textarea name="edit[inter]" id="edit-inter" rows="6" cols="70"></textarea>
</div>
<div class="form-item">
<label for="edit-intro">self-introduction:<br>
</label>
<textarea name="edit[intro]" id="edit-intro" rows="6" cols="70"></textarea>
</div>
<input type="submit" name="op" value="register"  class="form-submit" onclick="return check_form();"  />
<br /><br />
</div></form>

<!-- end content -->
</td>
</tr>
</table>
</div>
</body>
</html>